package com.adou.common.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.LinkedHashMap;
import java.util.Map;

public class BaseController {

    protected static final Logger logger = LoggerFactory.getLogger(BaseController.class);

    protected int pageNum = 1;

    protected int pageSize = 10;

    protected Map<String, Object> resultMap = new LinkedHashMap<String, Object>();

    public BaseController(){
        resultMap.put("result", 1);
        resultMap.put("msg", "操作成功!");
        resultMap.put("sessionid", "");
        resultMap.put("data", "");
    }

    public void  error(int result,String msg){
        resultMap.put("result",result);
        resultMap.put("msg",msg);
    }

}
